package com.neusoft.service.impl;

import com.neusoft.mapper.AdminWalletMapper;
import com.neusoft.service.AdminWalletService;
import com.neusoft.domain.VirtualWalletPO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.math.BigDecimal;

@Service
public class AdminWalletServiceImpl implements AdminWalletService {

    @Autowired
    private AdminWalletMapper adminWalletMapper;

    private BigDecimal depositRewardRate = BigDecimal.valueOf(0.01);  // 默认每充值100元奖励1元
    private BigDecimal withdrawFeeRate = BigDecimal.valueOf(0.01);    // 默认每提现100元收1元手续费

    @Override
    public void setRules(BigDecimal depositRewardRate, BigDecimal withdrawFeeRate) {
        this.depositRewardRate = depositRewardRate;
        this.withdrawFeeRate = withdrawFeeRate;
    }

    @Override
    public BigDecimal getDepositRewardRate() {
        return depositRewardRate;
    }

    @Override
    public BigDecimal getWithdrawFeeRate() {
        return withdrawFeeRate;
    }

    @Override
    public VirtualWalletPO findById(Long walletId){
        return adminWalletMapper.findById(walletId);
    }
    // 实现其他业务方法
}